package com.jingxi.portal.controller;

import com.jingxi.portal.service.ContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
public class BaController {
    @Autowired
    private ContentService contentService;
    @RequestMapping(value = "/index",method = RequestMethod.GET)
    public String index(Model model){
        String adJson=contentService.getContentList();
        model.addAttribute("ad1",adJson);
        return "index";
    }
}
